package com.itheima.jingjie.map;

import java.util.HashMap;
import java.util.Map;

public class Demo1 {
    public static void main(String[] args) {
        Map<String ,String> map=new HashMap<String, String>();
        map.put("001","小智");
        map.put("003","小妹");
        map.put("004","小林");
        map.put("005","小李");
        map.put("001","da智");
        map.put("002","小智");
        //containsKsy(map);
        //containsvalue(map);
        //mapclearisempty(map);
        //size(map);


        //System.out.println(map);
    }

    public static void containsvalue(Map<String, String> map) {
        boolean xiaozhi = map.containsValue("xiaozhi");
        System.out.println(xiaozhi);
        boolean 小智 = map.containsValue("小智");
        System.out.println(小智);
    }

    public static void containsKsy(Map<String, String> map) {
        System.out.println(map.containsKey("002"));
        boolean b = map.containsKey("006");
        System.out.println(b);
    }

    public static void size(Map<String, String> map) {
        int size = map.size();
        System.out.println(size);
    }

    public static void mapclearisempty(Map<String, String> map) {
        boolean empty = map.isEmpty();
        System.out.println(empty);
        map.clear();
        boolean empty1 = map.isEmpty();
        System.out.println(empty1);
    }

}
